#include <iostream>
using namespace std;

class Person
{
public:
	Person() {};
	Person(int a, int b)
	{
		this->m_A = a;
		this->m_B = b;
	}

	/**
	 * @brief 成员函数实现 + 号运算符重载
	 * @param p 
	 * @return 
	 */
	Person operator+(const Person& p);

public:
	int m_A;
	int m_B;
};

Person Person::operator+(const Person& p)
{
	Person result;
	result.m_A = this->m_A + p.m_A;
	result.m_B = this->m_B + p.m_B;
	return result;
}


int main(void)
{
	Person p1(10, 20), p2(30, 40);
	Person p3 = p1 + p2;
	cout << p3.m_A << p3.m_B << endl;

	return 0;
}